package com.hui.server.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author hui
 * @since 2022-03-31
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("t_joblevel")
@ApiModel(value = "Joblevel对象", description = "")
@RequiredArgsConstructor//会生成一个包含常量，和标识了NotNull的变量的构造方法。生成的构造方法是私有的private
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false,of = "name")//生成 name 的hashcode和equals方法
public class Joblevel implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("职称名称")
    @TableField("name")
    @Excel(name = "职称名称",width = 15)
    @NonNull
    private String name;

    @ApiModelProperty("职称等级")
    @TableField("titleLevel")
    private String titleLevel;

    @TableField(value = "createDate",fill = FieldFill.INSERT)   //自动填充策略
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private LocalDateTime createDate;

    @ApiModelProperty("是否启用")
    @TableField("enabled")
    private Boolean enabled;


}
